/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - VoQuotationPopupList.as.
 */

package com.model.valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.util.FiberUtils;
import com.adobe.fiber.valueobjects.IValueObject;
import com.model.valueObjects.VOPrice;
import flash.events.Event;
import flash.events.EventDispatcher;
import mx.binding.utils.ChangeWatcher;
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.PropertyChangeEvent;
import mx.validators.ValidationResult;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_VoQuotationPopupList extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
        try
        {
            if (flash.net.getClassByAlias("VoQuotationPopupList") == null)
            {
                flash.net.registerClassAlias("VoQuotationPopupList", cz);
            }
        }
        catch (e:Error)
        {
            flash.net.registerClassAlias("VoQuotationPopupList", cz);
        }
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
        com.model.valueObjects.VOPrice.initRemoteClassAliasSingleChild();
    }

    model_internal var _dminternal_model : _VoQuotationPopupListEntityMetadata;

    /**
     * properties
     */
    private var _internal_stamp_number : String;
    private var _internal_quotation_serialnumber_fk : int;
    private var _internal_pro_name : String;
    private var _internal_price_per_unit : Number;
    private var _internal_sgd_listprice : Number;
    private var _internal_base_currency_detserialnumber_fk : int;
    private var _internal_part_number : String;
    private var _internal_pro_serialnumber_fk : int;
    private var _internal_quotation_code : String;
    private var _internal_pro_description : String;
    private var _internal_isSelected : Boolean;
    private var _internal_pro_detserialnumber : int;
    private var _internal_quot_detserialnumber : int;
    private var _internal_pro_qty : Number;
    private var _internal_quot_serialnumber : int;
    private var _internal_other_part_no : String;
    private var _internal_price_list : ArrayCollection;
    model_internal var _internal_price_list_leaf:com.model.valueObjects.VOPrice;
    private var _internal_default_price : String;

    private static var emptyArray:Array = new Array();

    // Change this value according to your application's floating-point precision
    private static var epsilon:Number = 0.0001;

    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_VoQuotationPopupList()
    {
        _model = new _VoQuotationPopupListEntityMetadata(this);

        // Bind to own data properties for cache invalidation triggering
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "stamp_number", model_internal::setterListenerStamp_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_name", model_internal::setterListenerPro_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "part_number", model_internal::setterListenerPart_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "quotation_code", model_internal::setterListenerQuotation_code));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_description", model_internal::setterListenerPro_description));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "other_part_no", model_internal::setterListenerOther_part_no));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "price_list", model_internal::setterListenerPrice_list));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "default_price", model_internal::setterListenerDefault_price));

    }

    /**
     * data property getters
     */

    [Bindable(event="propertyChange")]
    public function get stamp_number() : String
    {
        return _internal_stamp_number;
    }

    [Bindable(event="propertyChange")]
    public function get quotation_serialnumber_fk() : int
    {
        return _internal_quotation_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get pro_name() : String
    {
        return _internal_pro_name;
    }

    [Bindable(event="propertyChange")]
    public function get price_per_unit() : Number
    {
        return _internal_price_per_unit;
    }

    [Bindable(event="propertyChange")]
    public function get sgd_listprice() : Number
    {
        return _internal_sgd_listprice;
    }

    [Bindable(event="propertyChange")]
    public function get base_currency_detserialnumber_fk() : int
    {
        return _internal_base_currency_detserialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get part_number() : String
    {
        return _internal_part_number;
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fk() : int
    {
        return _internal_pro_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get quotation_code() : String
    {
        return _internal_quotation_code;
    }

    [Bindable(event="propertyChange")]
    public function get pro_description() : String
    {
        return _internal_pro_description;
    }

    [Bindable(event="propertyChange")]
    public function get isSelected() : Boolean
    {
        return _internal_isSelected;
    }

    [Bindable(event="propertyChange")]
    public function get pro_detserialnumber() : int
    {
        return _internal_pro_detserialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get quot_detserialnumber() : int
    {
        return _internal_quot_detserialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get pro_qty() : Number
    {
        return _internal_pro_qty;
    }

    [Bindable(event="propertyChange")]
    public function get quot_serialnumber() : int
    {
        return _internal_quot_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get other_part_no() : String
    {
        return _internal_other_part_no;
    }

    [Bindable(event="propertyChange")]
    public function get price_list() : ArrayCollection
    {
        return _internal_price_list;
    }

    [Bindable(event="propertyChange")]
    public function get default_price() : String
    {
        return _internal_default_price;
    }

    /**
     * data property setters
     */

    public function set stamp_number(value:String) : void
    {
        var oldValue:String = _internal_stamp_number;
        if (oldValue !== value)
        {
            _internal_stamp_number = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "stamp_number", oldValue, _internal_stamp_number));
        }
    }

    public function set quotation_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_quotation_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_quotation_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "quotation_serialnumber_fk", oldValue, _internal_quotation_serialnumber_fk));
        }
    }

    public function set pro_name(value:String) : void
    {
        var oldValue:String = _internal_pro_name;
        if (oldValue !== value)
        {
            _internal_pro_name = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_name", oldValue, _internal_pro_name));
        }
    }

    public function set price_per_unit(value:Number) : void
    {
        var oldValue:Number = _internal_price_per_unit;
        if (isNaN(_internal_price_per_unit) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_price_per_unit = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "price_per_unit", oldValue, _internal_price_per_unit));
        }
    }

    public function set sgd_listprice(value:Number) : void
    {
        var oldValue:Number = _internal_sgd_listprice;
        if (isNaN(_internal_sgd_listprice) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_sgd_listprice = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sgd_listprice", oldValue, _internal_sgd_listprice));
        }
    }

    public function set base_currency_detserialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_base_currency_detserialnumber_fk;
        if (oldValue !== value)
        {
            _internal_base_currency_detserialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "base_currency_detserialnumber_fk", oldValue, _internal_base_currency_detserialnumber_fk));
        }
    }

    public function set part_number(value:String) : void
    {
        var oldValue:String = _internal_part_number;
        if (oldValue !== value)
        {
            _internal_part_number = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "part_number", oldValue, _internal_part_number));
        }
    }

    public function set pro_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_pro_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_pro_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fk", oldValue, _internal_pro_serialnumber_fk));
        }
    }

    public function set quotation_code(value:String) : void
    {
        var oldValue:String = _internal_quotation_code;
        if (oldValue !== value)
        {
            _internal_quotation_code = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "quotation_code", oldValue, _internal_quotation_code));
        }
    }

    public function set pro_description(value:String) : void
    {
        var oldValue:String = _internal_pro_description;
        if (oldValue !== value)
        {
            _internal_pro_description = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_description", oldValue, _internal_pro_description));
        }
    }

    public function set isSelected(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_isSelected;
        if (oldValue !== value)
        {
            _internal_isSelected = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "isSelected", oldValue, _internal_isSelected));
        }
    }

    public function set pro_detserialnumber(value:int) : void
    {
        var oldValue:int = _internal_pro_detserialnumber;
        if (oldValue !== value)
        {
            _internal_pro_detserialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_detserialnumber", oldValue, _internal_pro_detserialnumber));
        }
    }

    public function set quot_detserialnumber(value:int) : void
    {
        var oldValue:int = _internal_quot_detserialnumber;
        if (oldValue !== value)
        {
            _internal_quot_detserialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "quot_detserialnumber", oldValue, _internal_quot_detserialnumber));
        }
    }

    public function set pro_qty(value:Number) : void
    {
        var oldValue:Number = _internal_pro_qty;
        if (isNaN(_internal_pro_qty) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_pro_qty = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_qty", oldValue, _internal_pro_qty));
        }
    }

    public function set quot_serialnumber(value:int) : void
    {
        var oldValue:int = _internal_quot_serialnumber;
        if (oldValue !== value)
        {
            _internal_quot_serialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "quot_serialnumber", oldValue, _internal_quot_serialnumber));
        }
    }

    public function set other_part_no(value:String) : void
    {
        var oldValue:String = _internal_other_part_no;
        if (oldValue !== value)
        {
            _internal_other_part_no = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "other_part_no", oldValue, _internal_other_part_no));
        }
    }

    public function set price_list(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_price_list;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_price_list = value;
            }
            else if (value is Array)
            {
                _internal_price_list = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of price_list must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "price_list", oldValue, _internal_price_list));
        }
    }

    public function set default_price(value:String) : void
    {
        var oldValue:String = _internal_default_price;
        if (oldValue !== value)
        {
            _internal_default_price = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "default_price", oldValue, _internal_default_price));
        }
    }

    /**
     * Data property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */

    model_internal function setterListenerStamp_number(value:flash.events.Event):void
    {
        _model.invalidateDependentOnStamp_number();
    }

    model_internal function setterListenerPro_name(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPro_name();
    }

    model_internal function setterListenerPart_number(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPart_number();
    }

    model_internal function setterListenerQuotation_code(value:flash.events.Event):void
    {
        _model.invalidateDependentOnQuotation_code();
    }

    model_internal function setterListenerPro_description(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPro_description();
    }

    model_internal function setterListenerOther_part_no(value:flash.events.Event):void
    {
        _model.invalidateDependentOnOther_part_no();
    }

    model_internal function setterListenerPrice_list(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPrice_list);
            }
        }
        _model.invalidateDependentOnPrice_list();
    }

    model_internal function setterListenerDefault_price(value:flash.events.Event):void
    {
        _model.invalidateDependentOnDefault_price();
    }


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;
        if (!_model.stamp_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_stamp_numberValidationFailureMessages);
        }
        if (!_model.pro_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_nameValidationFailureMessages);
        }
        if (!_model.part_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_part_numberValidationFailureMessages);
        }
        if (!_model.quotation_codeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_quotation_codeValidationFailureMessages);
        }
        if (!_model.pro_descriptionIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_descriptionValidationFailureMessages);
        }
        if (!_model.other_part_noIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_other_part_noValidationFailureMessages);
        }
        if (!_model.price_listIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_price_listValidationFailureMessages);
        }
        if (!_model.default_priceIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_default_priceValidationFailureMessages);
        }

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _VoQuotationPopupListEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _VoQuotationPopupListEntityMetadata) : void
    {
        var oldValue : _VoQuotationPopupListEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }

    model_internal var _doValidationCacheOfStamp_number : Array = null;
    model_internal var _doValidationLastValOfStamp_number : String;

    model_internal function _doValidationForStamp_number(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfStamp_number != null && model_internal::_doValidationLastValOfStamp_number == value)
           return model_internal::_doValidationCacheOfStamp_number ;

        _model.model_internal::_stamp_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isStamp_numberAvailable && _internal_stamp_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "stamp_number is required"));
        }

        model_internal::_doValidationCacheOfStamp_number = validationFailures;
        model_internal::_doValidationLastValOfStamp_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_name : Array = null;
    model_internal var _doValidationLastValOfPro_name : String;

    model_internal function _doValidationForPro_name(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPro_name != null && model_internal::_doValidationLastValOfPro_name == value)
           return model_internal::_doValidationCacheOfPro_name ;

        _model.model_internal::_pro_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_nameAvailable && _internal_pro_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_name is required"));
        }

        model_internal::_doValidationCacheOfPro_name = validationFailures;
        model_internal::_doValidationLastValOfPro_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPart_number : Array = null;
    model_internal var _doValidationLastValOfPart_number : String;

    model_internal function _doValidationForPart_number(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPart_number != null && model_internal::_doValidationLastValOfPart_number == value)
           return model_internal::_doValidationCacheOfPart_number ;

        _model.model_internal::_part_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPart_numberAvailable && _internal_part_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "part_number is required"));
        }

        model_internal::_doValidationCacheOfPart_number = validationFailures;
        model_internal::_doValidationLastValOfPart_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfQuotation_code : Array = null;
    model_internal var _doValidationLastValOfQuotation_code : String;

    model_internal function _doValidationForQuotation_code(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfQuotation_code != null && model_internal::_doValidationLastValOfQuotation_code == value)
           return model_internal::_doValidationCacheOfQuotation_code ;

        _model.model_internal::_quotation_codeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isQuotation_codeAvailable && _internal_quotation_code == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "quotation_code is required"));
        }

        model_internal::_doValidationCacheOfQuotation_code = validationFailures;
        model_internal::_doValidationLastValOfQuotation_code = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_description : Array = null;
    model_internal var _doValidationLastValOfPro_description : String;

    model_internal function _doValidationForPro_description(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPro_description != null && model_internal::_doValidationLastValOfPro_description == value)
           return model_internal::_doValidationCacheOfPro_description ;

        _model.model_internal::_pro_descriptionIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_descriptionAvailable && _internal_pro_description == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_description is required"));
        }

        model_internal::_doValidationCacheOfPro_description = validationFailures;
        model_internal::_doValidationLastValOfPro_description = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfOther_part_no : Array = null;
    model_internal var _doValidationLastValOfOther_part_no : String;

    model_internal function _doValidationForOther_part_no(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfOther_part_no != null && model_internal::_doValidationLastValOfOther_part_no == value)
           return model_internal::_doValidationCacheOfOther_part_no ;

        _model.model_internal::_other_part_noIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isOther_part_noAvailable && _internal_other_part_no == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "other_part_no is required"));
        }

        model_internal::_doValidationCacheOfOther_part_no = validationFailures;
        model_internal::_doValidationLastValOfOther_part_no = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPrice_list : Array = null;
    model_internal var _doValidationLastValOfPrice_list : ArrayCollection;

    model_internal function _doValidationForPrice_list(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPrice_list != null && model_internal::_doValidationLastValOfPrice_list == value)
           return model_internal::_doValidationCacheOfPrice_list ;

        _model.model_internal::_price_listIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPrice_listAvailable && _internal_price_list == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "price_list is required"));
        }

        model_internal::_doValidationCacheOfPrice_list = validationFailures;
        model_internal::_doValidationLastValOfPrice_list = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDefault_price : Array = null;
    model_internal var _doValidationLastValOfDefault_price : String;

    model_internal function _doValidationForDefault_price(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfDefault_price != null && model_internal::_doValidationLastValOfDefault_price == value)
           return model_internal::_doValidationCacheOfDefault_price ;

        _model.model_internal::_default_priceIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDefault_priceAvailable && _internal_default_price == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "default_price is required"));
        }

        model_internal::_doValidationCacheOfDefault_price = validationFailures;
        model_internal::_doValidationLastValOfDefault_price = value;

        return validationFailures;
    }
    

}

}
